
//---------- 公用AJAX调用 ----------
function doPostAjax(param,callback,vars){
    $.ajax({
        type : 'POST',
        url : param.theUrl,
        data : param.theData,
        cache : false,
        success : function(data){callback(data,vars)},
        error:function(err){console.log(err)}
    });
}
function doGetAjax(param,callback,vars){
    $.ajax({
        type : 'GET',
        url : param.theUrl,
        data : param.theData,
        cache : false,
        success :function(data){callback(data,vars)}
    });
}


function $msg(msg,type){
    layui.use('layer', function () {
        layer.msg(msg,{icon:type||1,time:2000})
    });
  }

var statusModelMedia = {
    1:'待支付',
    2:'已支付',
    3:'已取消',
    4:'已取消',
    5:'执行中',
    6:'已完成',
    7:'已完成',
    8:'已取消',
    9:'已取消',
    10:'已取消',
    11:'已取消',
    12:'已完成'
}
var statusModelAd = {
    1:'待支付',
    2:'已支付',
    3:'已取消',
    4:'已取消',
    5:'执行中',
    6:'已完成',
    7:'已完成',
    8:'已取消',
    9:'已取消',
    10:'已取消',
    11:'已取消',
    12:'已完成'
}
var allAPI = allAPI || {};
allAPI = (function(){
    var api = allAPI
    return {
        user : {
            code : '/get/code'
            ,login : '/member/index'
            ,excel : '/member/excel/export/'
            ,forgot : '/member/forgot'
            ,checkCode : '/member/check/code'
            ,show : '/source/'
            ,vote : '/member/vote'
        },
        member:{
            orderList:'/member/order/',
            orderDeal:'/member/order/deal/'
        },
        auth:{
            weixin:'/oauth/weixin'
            ,qq:'/oauth/qq'
            ,weibo:'/oauth/weibo'
        },
        apply:{
            generate:'/member/apply/create'
            ,orderPay: '/member/order/pay'
            ,orderRePay: '/member/order/pay'
            ,setPass: '/member/set/pass'
            ,update: '/member/order/update/'
            ,repay: '/member/order/repay'
            ,index: '/member/order/article'
        },
        charge:{
            recharge:'/member/recharge'
        }
        ,file:{
            content : '/member/get/content'
        }
        ,account:{
            create:'/member/account'
            ,cashApply:'/media/cash/apply'
            ,mediaPassword:'/media/password/update'
            ,mediaContactPhone:'/media/contact/phone/update'
            ,qq:'/media/contact/qq'
        }
        ,order:{
            data:'/member/order/data/'
            ,media:'/media/order/data/'
            ,cloud:'/media/cloud/data/'
            ,again_up:'/media/again/finish/url'
        }
        ,show:{
            order:'/media/order/show/'
            ,deal:'/media/order/deal/'
            ,preview:'/active/preview/'
            ,orderAdvertMessage:'/order/advert/message/'
            ,orderMediaMessage:'/order/media/message/'
            ,detail:'/order/show/'
            ,log:'/member/advert/order/'
        }
        ,task:{
            taskData:'/member/task/data/',
            advertTaskStore:'/member/task/store/',
            advertTaskSupply:'/member/task/supply/',
            advertReply:'/member/task/supply/data',
            mediaReply:'/media/task/supply/data'
        }
    }
})();
var api = allAPI || {};

